import request from '@/utils/request'

// 查询待检订单列表
export function listGoQuality(query) {
  return request({
    url: '/quality/goQuality/list',
    method: 'get',
    params: query
  })
}

// 新增待检订单
// export function addGoQuality(data) {
//   return request({
//     url: '/quality/goQuality',
//     method: 'post',
//     data: data
//   })
// }
// 根据id查询待检订单详细
export function getGoQuality(orderNumber) {
  return request({
    url: '/quality/goQuality/' + orderNumber,
    method: 'get'
  })
}
// 修改待检订单
export function updateGoQuality(data) {
  return request({
    url: '/quality/goQuality',
    method: 'put',
    data: data
  })
}

// 手动触发插入待质检订单
export function insertPendingOrdersToQualityStatus() {
  return request({
    url: '/quality/goQuality/insertPending', // 对应 Controller 里的路径
    method: 'post'
  })
}


// 绑定质检员到订单
export function bindQualityMan(data) {
  return request({
    url: '/quality/goQuality/bindQualityMan',
    method: 'post',
    data
  });
}
